package com.datalayer.testclasses;

import com.datalayer.annotations.Attribute;
import com.datalayer.annotations.Constraint;
import com.datalayer.annotations.Direction;
import com.datalayer.annotations.Entity;

/**
 * Created with IntelliJ IDEA.
 * User: Georgiana.Scarlat
 * Date: 7/6/12
 * Time: 4:30 PM
 */
@SuppressWarnings("ALL")
@Entity(tableName = "AnotherTable")
public class AnotherTable {

    private int attribute1;
    private String attribute2;
    private int attribute3;

    public AnotherTable(int attribute1, String attribute2, int attribute3) {
        this.attribute1 = attribute1;
        this.attribute2 = attribute2;
        this.attribute3 = attribute3;
    }

    @Direction("get")
    @Attribute(fieldName = "attribute3", attributeName = "A3", type = "int")
    @Constraint(constraintName = "primary key")
    public int getAttribute3() {
        return attribute3;
    }

    @Direction("get")
    @Attribute(fieldName = "attribute1", attributeName = "A1", type = "int")
    @Constraint(constraintName = "unique")
    public int getAttribute1() {
        return attribute1;
    }

    @Direction("get")
    @Constraint(constraintName = "not null")
    @Attribute(fieldName = "attribute2", attributeName = "A2", type = "varchar(20)")
    public String getAttribute2() {
        return attribute2;
    }
}
